x86 numa: Fix SRAT check for discontig memory
authorKeir Fraser <keir.fraser@citrix.com>
Tue, 25 Aug 2009 13:58:42 +0000 (14:58 +0100)
committerKeir Fraser <keir.fraser@citrix.com>
Tue, 25 Aug 2009 13:58:42 +0000 (14:58 +0100)
commit92f8888d407253a91e15b0be92002e5e23f9c1c3
treea0b8ea9082d71690bb0a3af1b651f14b3b1d3ebb
parent1e52826824aa236e1fb27e9aa21c72432dbf399a
x86 numa: Fix SRAT check for discontig memory

We currently compare the sum of the pages found in the SRAT table to
the address of the highest memory page found via the e820 table to
validate the SRAT.  This is completely bogus if there's any kind of
discontiguous memory, where the sum of the pages could be much smaller
than the address of the highest page.  I think all that's necessary is
to validate that each usable memory range in the e820 is covered by an
SRAT entry.  This might not be the most efficient way to do it, but
there are usually a relatively small number of entries on each side.

Signed-off-by: Alex Williamson <alex.williamson@hp.com>
xen/arch/x86/srat.c